from model import Model, Dao


class Subject(Model):
    def __init__(self, _dict):
        """Arguments:
            parent_id --- int type, 0 means root
        """
        Model.__init__(self, _dict)
        self.body = _dict['body']
        

    def __repr__(self):
        return '<Subject %r>' % (self.body)

class SubjectDao(Dao):
    def __init__(self):
        Dao.__init__(self, Subject)
        self.collection = 'subjects'

if __name__ == '__main__':
    # create table
    pass